float stepSize;
int accuracy;
uniform extern texture sourceTexture;
sampler sourceMap = sampler_state
{
   Texture = <sourceTexture>;
};
uniform extern texture overlayTexture;
sampler overlayMap = sampler_state
{
   Texture = <overlayTexture>;
};
struct PS_INPUT 
{
   float2 Texcoord : TEXCOORD0;
};
float4 MoveToward_Pass_0_Pixel_Shader_ps_main( PS_INPUT Input ) : COLOR0
{
   stepSize = stepSize / accuracy;
   float4 sourceValue = tex2D( sourceMap, Input.Texcoord );
   float4 overlayValue = tex2D( overlayMap, Input.Texcoord );
   float4 pixelValue = overlayValue - sourceValue;
   return sourceValue + min( abs( pixelValue ), stepSize ) * sign( pixelValue );
}
technique MoveToward
{
   pass Pass_0
   {
      PixelShader = compile ps_2_0 MoveToward_Pass_0_Pixel_Shader_ps_main();
   }
}

